package com.mes.system.domain;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;

import com.mes.common.core.domain.BaseEntity;
import lombok.Data;
import com.mes.common.utils.log.annotation.FieldRemark;
import com.mes.common.utils.log.annotation.LogField;
import com.mes.common.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 编码生成规则组成表对象 sys_auto_code_part
 * @author hwg
 * @email hwg
 * @date 2023-04-22
 */
@Data
public class SysAutoCodePart extends BaseEntity<SysAutoCodePart>
{
    private static final long serialVersionUID = 1L;

    /** 规则ID */
    private String ruleId;

    /** 分段序号 */
    @Excel(name = "分段序号")
    @LogField
    @FieldRemark(name = "分段序号",field = "partIndex")
    private Integer partIndex;

    /** 分段类型 */
    @Excel(name = "分段类型", dictType = "serial_number_part_type")
    @NotBlank(message = "分段类型不允许为空")
    @LogField
    @FieldRemark(name = "分段类型",field = "partType")
    private String partType;

    /** 分段编号 */
    @Excel(name = "分段编号")
    @LogField
    @FieldRemark(name = "分段编号",field = "partCode")
    private String partCode;

    /** 分段名称 */
    @Excel(name = "分段名称")
    @LogField
    @FieldRemark(name = "分段名称",field = "partName")
    private String partName;

    /** 分段长度 */
    @Excel(name = "分段长度")
    @LogField
    @FieldRemark(name = "分段长度",field = "partLength")
    private Integer partLength;

    /** 日期时间格式 */
    @Excel(name = "日期时间格式")
    @LogField
    @FieldRemark(name = "日期时间格式",field = "dateFormat")
    private String dateFormat;

    /** 输入字符 */
    @LogField
    @FieldRemark(name = "输入字符",field = "inputCharacter")
    private String inputCharacter;

    /** 固定字符 */
    @LogField
    @FieldRemark(name = "固定字符",field = "fixCharacter")
    private String fixCharacter;

    /** 流水号起始值 */
    @LogField
    @FieldRemark(name = "流水号起始值",field = "seriaStartNo")
    private Integer seriaStartNo;

    /** 流水号步长 */
    @LogField
    @FieldRemark(name = "流水号步长",field = "seriaStep")
    private Integer seriaStep;

    /** 流水号当前值 */
    @LogField
    @FieldRemark(name = "流水号当前值",field = "seriaNowNo")
    private Integer seriaNowNo;

    /** 流水号是否循环 */
    @LogField
    @FieldRemark(name = "流水号是否循环",field = "cycleFlag")
    private String cycleFlag;

    /** 循环方式，YEAR：按年，MONTH：按月，DAY：按天，HOUR：按小时，MINITE：按分钟，OTHER：按传入字符变 */
    @LogField
    @FieldRemark(name = "循环方式，YEAR：按年，MONTH：按月，DAY：按天，HOUR：按小时，MINITE：按分钟，OTHER：按传入字符变",field = "cycleMethod")
    private String cycleMethod;

    /** 预留字段1 */
    private String attr1;

    /** 预留字段2 */
    private String attr2;

    /** 预留字段3 */
    private Long attr3;

    /** 预留字段4 */
    private Long attr4;

    /** 租户id */
    private String tenantId;

    /** 状态（0正常 1停用） */
    private String status;

    public void setRuleId(String ruleId)
    {
        this.ruleId = ruleId;
    }

    public String getRuleId()
    {
        return ruleId;
    }

    public void setPartIndex(Integer partIndex)
    {
        this.partIndex = partIndex;
    }

    public Integer getPartIndex()
    {
        return partIndex;
    }

    public void setPartType(String partType)
    {
        this.partType = partType;
    }

    public String getPartType()
    {
        return partType;
    }

    public void setPartCode(String partCode)
    {
        this.partCode = partCode;
    }

    public String getPartCode()
    {
        return partCode;
    }

    public void setPartName(String partName)
    {
        this.partName = partName;
    }

    public String getPartName()
    {
        return partName;
    }

    public void setPartLength(Integer partLength)
    {
        this.partLength = partLength;
    }

    public Integer getPartLength()
    {
        return partLength;
    }

    public void setDateFormat(String dateFormat)
    {
        this.dateFormat = dateFormat;
    }

    public String getDateFormat()
    {
        return dateFormat;
    }

    public void setInputCharacter(String inputCharacter)
    {
        this.inputCharacter = inputCharacter;
    }

    public String getInputCharacter()
    {
        return inputCharacter;
    }

    public void setFixCharacter(String fixCharacter)
    {
        this.fixCharacter = fixCharacter;
    }

    public String getFixCharacter()
    {
        return fixCharacter;
    }

    public void setSeriaStartNo(Integer seriaStartNo)
    {
        this.seriaStartNo = seriaStartNo;
    }

    public Integer getSeriaStartNo()
    {
        return seriaStartNo;
    }

    public void setSeriaStep(Integer seriaStep)
    {
        this.seriaStep = seriaStep;
    }

    public Integer getSeriaStep()
    {
        return seriaStep;
    }

    public void setSeriaNowNo(Integer seriaNowNo)
    {
        this.seriaNowNo = seriaNowNo;
    }

    public Integer getSeriaNowNo()
    {
        return seriaNowNo;
    }

    public void setCycleFlag(String cycleFlag)
    {
        this.cycleFlag = cycleFlag;
    }

    public String getCycleFlag()
    {
        return cycleFlag;
    }

    public void setCycleMethod(String cycleMethod)
    {
        this.cycleMethod = cycleMethod;
    }

    public String getCycleMethod()
    {
        return cycleMethod;
    }

    public void setAttr1(String attr1)
    {
        this.attr1 = attr1;
    }

    public String getAttr1()
    {
        return attr1;
    }

    public void setAttr2(String attr2)
    {
        this.attr2 = attr2;
    }

    public String getAttr2()
    {
        return attr2;
    }

    public void setAttr3(Long attr3)
    {
        this.attr3 = attr3;
    }

    public Long getAttr3()
    {
        return attr3;
    }

    public void setAttr4(Long attr4)
    {
        this.attr4 = attr4;
    }

    public Long getAttr4()
    {
        return attr4;
    }

    public void setTenantId(String tenantId)
    {
        this.tenantId = tenantId;
    }

    public String getTenantId()
    {
        return tenantId;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("ruleId", getRuleId())
            .append("partIndex", getPartIndex())
            .append("partType", getPartType())
            .append("partCode", getPartCode())
            .append("partName", getPartName())
            .append("partLength", getPartLength())
            .append("dateFormat", getDateFormat())
            .append("inputCharacter", getInputCharacter())
            .append("fixCharacter", getFixCharacter())
            .append("seriaStartNo", getSeriaStartNo())
            .append("seriaStep", getSeriaStep())
            .append("seriaNowNo", getSeriaNowNo())
            .append("cycleFlag", getCycleFlag())
            .append("cycleMethod", getCycleMethod())
            .append("attr1", getAttr1())
            .append("attr2", getAttr2())
            .append("attr3", getAttr3())
            .append("attr4", getAttr4())
            .append("tenantId", getTenantId())
            .append("status", getStatus())
            .append("remark", getRemark())
            .append("id", getId())
            .append("createBy", getCreateBy())
            .append("createDept", getCreateDept())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("updateIp", getUpdateIp())
            .append("version", getVersion())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
